import { Client } from './index.js';
import {StreamableHTTPClientTransport, StreamableHTTPError} from './streamableHttp.js';
import {SSEClientTransport, SseError} from "./sse.js";
import {WebSocketClientTransport} from "./websocket.js";

// 导出所有需要的类和函数
export {
    Client,
    StreamableHTTPClientTransport,
    StreamableHTTPError,
    SSEClientTransport,
    SseError,
    WebSocketClientTransport
};

export default {
    Client,
    StreamableHTTPClientTransport,
    StreamableHTTPError,
    SSEClientTransport,
    SseError,
    WebSocketClientTransport
};

// 为Electron环境添加全局变量导出
if (typeof window !== 'undefined') {
    window.McpClient = {
        Client,
        StreamableHTTPClientTransport,
        StreamableHTTPError,
        SSEClientTransport,
        SseError,
        WebSocketClientTransport
    };
}
